﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using HP.Cachalote.DataModels;

namespace HP.Cachalote.Repositories.Interfaces
{
    public interface ITodoItemRepository : IRepository<TodoItem>
    {
        // <summary>
        /// Get TodoItem by id. It will return null if the TodoItem does not exist.
        /// </summary>
        /// <param name="id">The specified id.</param>
        /// /// <param name="loadTodoLabel">True to load related TodoLabel at the same time. False NOT load.</param>
        /// <returns>The matched TodoItem.</returns>
        TodoItem Get(object id, bool loadTodoLabel);

        /// <summary>
        /// Filter TodoItem by lambda expression.
        /// </summary>
        /// <param name="expression">The lambda expression that accepts TodoItem and return boolean.</param>
        /// <param name="loadTodoLabel">True to load related TodoLabel at the same time. False NOT load.</param>
        /// <returns>An IQueryable list of TodoItem.</returns>
        IQueryable<TodoItem> Filter(Expression<Func<TodoItem, bool>> expression, bool loadTodoLabel);
    }
}
